export default function getComponentName(src){
    const files = require.context('./',true,/index\.tsx$/)
    return findModule(files,src)
}
function findModule(files,src){
    return files.keys().reduce((prev,item)=>{
        //./login/index.tsx
        let [,key] = item.match(/^\.\/(.+)\/index\.tsx$/)
        prev[key] = files(item).default //class Login extends Component {
        return prev
    },{})[src]
}
// componets:getComponeName("Login")